package com.bjbn.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 通用响应参数
 */
@Data
public class CommonResponse {
    /*
    * {
	“result_code”:”返回码”,
	“message”:”返回信息”,
    “data_items”: [{
                    “item_id”:”记录id”,
                    “code”:”业务返回码”,
                    “message”:”业务信息”
    }]
          }
    * */
    @Schema(description = "返回码", example = "0", required = true)
    @NotBlank(message = "返回码不能为空")
    private int result_code;

    @Schema(description = "返回信息", example = "返回信息", required = false)
    private String message;

    @Schema(description = "数据项", example = "数据项", required = false)
    private CommonResDataItem[] data_items;
}
